package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YxDeviceAndGetuiMapper;
import com.ruoyi.system.domain.YxDeviceAndGetui;
import com.ruoyi.system.service.IYxDeviceAndGetuiService;

/**
 * 设备和个推cid储存Service业务层处理
 * 
 * @author lingyu
 * @date 2024-03-04
 */
@Service
public class YxDeviceAndGetuiServiceImpl implements IYxDeviceAndGetuiService 
{
    @Autowired
    private YxDeviceAndGetuiMapper yxDeviceAndGetuiMapper;

    /**
     * 查询设备和个推cid储存
     * 
     * @param id 设备和个推cid储存主键
     * @return 设备和个推cid储存
     */
    @Override
    public YxDeviceAndGetui selectYxDeviceAndGetuiById(Long id)
    {
        return yxDeviceAndGetuiMapper.selectYxDeviceAndGetuiById(id);
    }

    /**
     * 查询设备和个推cid储存列表
     * 
     * @param yxDeviceAndGetui 设备和个推cid储存
     * @return 设备和个推cid储存
     */
    @Override
    public List<YxDeviceAndGetui> selectYxDeviceAndGetuiList(YxDeviceAndGetui yxDeviceAndGetui)
    {
        return yxDeviceAndGetuiMapper.selectYxDeviceAndGetuiList(yxDeviceAndGetui);
    }

    /**
     * 新增设备和个推cid储存
     * 
     * @param yxDeviceAndGetui 设备和个推cid储存
     * @return 结果
     */
    @Override
    public int insertYxDeviceAndGetui(YxDeviceAndGetui yxDeviceAndGetui)
    {
        yxDeviceAndGetui.setCreateTime(DateUtils.getNowDate());
        return yxDeviceAndGetuiMapper.insertYxDeviceAndGetui(yxDeviceAndGetui);
    }

    /**
     * 修改设备和个推cid储存
     * 
     * @param yxDeviceAndGetui 设备和个推cid储存
     * @return 结果
     */
    @Override
    public int updateYxDeviceAndGetui(YxDeviceAndGetui yxDeviceAndGetui)
    {
        return yxDeviceAndGetuiMapper.updateYxDeviceAndGetui(yxDeviceAndGetui);
    }

    /**
     * 批量删除设备和个推cid储存
     * 
     * @param ids 需要删除的设备和个推cid储存主键
     * @return 结果
     */
    @Override
    public int deleteYxDeviceAndGetuiByIds(Long[] ids)
    {
        return yxDeviceAndGetuiMapper.deleteYxDeviceAndGetuiByIds(ids);
    }

    /**
     * 删除设备和个推cid储存信息
     * 
     * @param id 设备和个推cid储存主键
     * @return 结果
     */
    @Override
    public int deleteYxDeviceAndGetuiById(Long id)
    {
        return yxDeviceAndGetuiMapper.deleteYxDeviceAndGetuiById(id);
    }
}
